import request from '@/utils/request.js'

export const artGetChannelsService=()=>request.get('/my/cate/list') //获取文章分类

export const artAddChannelsService=(data)=>request.post('/my/cate/add',data) //添加文章分类

export const artEditChannelsService=(data)=>request.put('/my/cate/info',data) //更新（编辑）文章分类

export const artDelChannelServic=id=>request.delete('/my/cate/del',{params:{id}}) //删除接口的封装

export const artGetListService=(params)=>request.get('/my/article/list',{ params }) //获取文章列表

export const artPublishService = (data)=>request.post('/my/article/add',data) //文章:添加文章 data需要是一个formData格式的对象

export const artGetDetailService=(id)=>request.get('/my/article/info',{params:{id}}) //获取文章详情 用于编辑前的回显

export const artEditService = (data)=>request.put('/my/article/info',data) //编辑文章接口

export const artDeleteService=(id) =>request.delete('/my/article/info',{params:{id}}) //删除文章